package com.lanzuo.collector.updater.http;

import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Var;
import com.dtflys.forest.callback.OnProgress;
import com.dtflys.forest.extensions.DownloadFile;

import java.io.File;

/**
 *
 */
public interface NginxFileInterface {

    @Get(url = "{base_url}/{filename}")
    @DownloadFile(dir = "{target_dir}", filename = "${0}")
    File downloadFile(@Var("filename") String filename, OnProgress onProgress);


    @Get(url = "http://10.0.132.140/update/collector/file/eap-pana-mounter-adapter@v1_0_1.jar")
    @DownloadFile(dir = "D://BlueScada//collector", filename = "{0}")
    File downloadFileDemo(String filename, OnProgress onProgress);
}
